package de.jeeyeon.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public final class DateProvider 
{

	public static String getDate()
	{
		Date date = new Date();
		SimpleDateFormat df = new SimpleDateFormat( "dd-MM-yyyy", Locale.GERMANY);
		String datestring = df.format(date);
		
		return datestring;
	}
	
	public static String getDateFromYesterday()
	{
		   Calendar cal = Calendar.getInstance();
		   DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.GERMANY);
		   cal.add(Calendar.DATE, -1);
		   
		   return dateFormat.format(cal.getTime());
	}
	
}
